import request from "@/utils/request";

export const info = (params: Info) => {
    // response 
    if (!params || !params.path) throw new Error('Params and params in path can not empty!')
    // 这里因为是全局的一个info，根据路由地址去请求侧边栏，所需不用把地址写死
    return request.post<Sidebar>(params.path, { routeName: params.routeName })
}

export const mockTest = () => {
    return request.get<any>('/upms/user/info',{})
}

export const login = (data:LoginFormDto) => {
    return request.post<LoginFormVo>('/token',data)
}